home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / bbs / mhis020.zip / BUILD.CMD < prev    next >
OS/2 REXX Batch file  |  1996-12-16  |  3KB  |  118 lines

  1. @echo off
  2. if %1. == . goto commandLineError
  3. if %2. == . goto noSecondParam
  4.  
  5. set MEX_INCLUDE=%2
  6. if exist %MEX_INCLUDE%\max.mh goto maxOk
  7. echo Can't find file: %MEX_INCLUDE%\max.mh
  8. goto maxMhError
  9. :noSecondParam
  10. if exist ..\m\max.mh BUILD %1 ..\m
  11. goto maxMhError
  12.  
  13.  
  14. :maxOk
  15. if exist %1\mexp.exe goto mexpOk
  16. echo Can't find file: %1\mexp.exe
  17. goto done
  18. :mexpOk
  19. if exist callinfo.mh goto callInfoOk
  20. echo Can't find file: callinfo.mh
  21. goto done
  22. :callInfoOk
  23.  
  24. %1\mexp calljump
  25. if errorlevel 1 goto compileError
  26. %1\mexp calllist
  27. if errorlevel 1 goto compileError
  28. %1\mexp callhdr
  29. if errorlevel 1 goto compileError
  30. %1\mexp callindi
  31. if errorlevel 1 goto compileError
  32. %1\mexp calldir
  33. if errorlevel 1 goto compileError
  34. %1\mexp listdays
  35. if errorlevel 1 goto compileError
  36. %1\mexp callstat
  37. if errorlevel 1 goto compileError
  38.  
  39. %1\mexp crithdr
  40. if errorlevel 1 goto compileError
  41. %1\mexp critname
  42. if errorlevel 1 goto compileError
  43. %1\mexp critcity
  44. if errorlevel 1 goto compileError
  45. %1\mexp critgkey
  46. if errorlevel 1 goto compileError
  47. %1\mexp critbkey
  48. if errorlevel 1 goto compileError
  49. %1\mexp crittask
  50. if errorlevel 1 goto compileError
  51. %1\mexp critdef
  52. if errorlevel 1 goto compileError
  53. %1\mexp critcall
  54. if errorlevel 1 goto compileError
  55. %1\mexp critlsec
  56. if errorlevel 1 goto compileError
  57. %1\mexp crithsec
  58. if errorlevel 1 goto compileError
  59. %1\mexp critbflg
  60. if errorlevel 1 goto compileError
  61. %1\mexp critgflg
  62. if errorlevel 1 goto compileError
  63. %1\meccap *.mec
  64. if errorlevel 1 goto compileError
  65.  
  66. echo.
  67. echo Compilation completed successfully.
  68. echo.
  69.  
  70. goto done
  71.  
  72. :commandLineError
  73.  
  74. if exist ..\MEXP.EXE goto clefmexp
  75. goto :nodefault
  76. :clefmexp
  77. BUILD ..
  78.  
  79. :nodefault
  80. echo Compiles all files necessary to run MaxHistory.
  81. echo.
  82. echo Syntax:
  83. echo.
  84. echo    BUILD [maximus directory] [mex include directories]
  85. echo.
  86. echo Where [maximus directory] is the name of the directory containing MECCAP.EXE
  87. echo and MEXP.EXE, and [mex include directories] includes the directory containing
  88. echo the file MAX.MH.
  89. echo.
  90. goto done
  91.  
  92. :maxMhError
  93. echo Please pass the directory containing max.mh as the second parameter
  94. echo to this batch file or type:
  95. echo.
  96. echo SET MEX_INCLUDE=[directory name]
  97. echo.
  98. echo before running this batch file, where [directory name] is the name
  99. echo of the directory containing max.mh. Usually, this file is located
  100. echo in a subdirectory of your main max directory called "m".
  101. echo.
  102. goto done
  103.  
  104. :compileError
  105. echo.
  106. echo Compilation errors were detected. These errors must be corrected
  107. echo before you can use MaxHistory. This may indicate that your copy
  108. echo of MaxHistory has been tampered with. For more information on
  109. echo compile time errors, see section 14.3 of your Maximus documentation.
  110. echo.
  111. :done
  112.  
  113. if %2. == . goto end
  114.  
  115. set MEX_INCLUDE=
  116.  
  117. :end
  118.